#!/usr/bin/env bash

SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd)

pushd "${SCRIPT_DIR}"
autoreconf -fvi
mkdir -p ".build"
popd

pushd "${SCRIPT_DIR}/.build"

# --enable-cet
# https://stackoverflow.com/questions/58995065/undefined-reference-to-dl-cet-check-while-building-glibc

../configure \
    --srcdir=.. \
    --prefix=/usr/local/rewine/rt \
    --enable-shared \
    --disable-timezone-tools \
    --disable-crypt \
    --enable-cet

    # --enable-maintainer-mode

popd
